package com.foreknow.elmboot.controller;

import com.foreknow.elmboot.po.Food;
import com.foreknow.elmboot.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by foreknow on 2022/5/7.
 */
@RestController
@RequestMapping("/FoodController")
public class FoodController {

   @Autowired
   private FoodService foodService;

   @RequestMapping("/listFoodByBusinessId")
   public List<Food> listFoodByBusinessId(Food food) {
     return foodService.listFoodByBusinessId(food.getBusinessId());
   }
}
